// Copyright (c) 2009 Luca Marrocco.
// Modified or written by Luca Marrocco for inclusion with codej.
// Licensed under the Apache License, Version 2.0 (the "License")
package codej.ast;

import java.util.*;

/** @author Luca Marrocco */
public class Bound extends AbstractNode {
	
	private List<Type> types = new LinkedList<Type>();

	public Bound() {
	}

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public Bound addType(Type type) {
		types.add(type);

		return this;
	}

	public List<Type> getTypes() {
		return types;
	}

	public Bound removeType(Type type) {
		if (types.contains(type))
			types.remove(type);
		return this;
	}
}
